#include <iostream>
#include <vector>
#include <algorithm>

class Sort
{
public:
    virtual void sort(std::vector<int>& v) = 0;
};

class FastSort:public Sort
{
public:
    void sort(std::vector<int>& v)
    {
        std::cout<<"快速排序"<<std::endl;
        std::sort(v.begin(), v.end());
    }
};

int main()
{
    std::vector<int> v= {1,56,3,4,5,6};
    std::random_shuffle(v.begin(), v.end());

    std::for_each(v.begin(), v.end(), [](int num){std::cout<<num<<" ";});
    std::cout<<std::endl;
    Sort *s = new FastSort;

    s->sort(v);
  
    std::for_each(v.begin(), v.end(), [](int num){std::cout<<num<<" ";});
    std::cout<<std::endl;

}